package com.ruoyi.business.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.business.domain.WmsDeliveryRecord;
import org.apache.ibatis.annotations.Param;

/**
 * 出库单Mapper接口
 *
 * @author ruoyi
 * @date 2024-01-13
 */
public interface WmsDeliveryRecordMapper
{
    /**
     * 查询出库单
     *
     * @param id 出库单主键
     * @return 出库单
     */
    public WmsDeliveryRecord selectWmsDeliveryRecordById(Long id);

    public WmsDeliveryRecord selectWmsDeliveryRecordByDeliveryNo(String deliveryNo);

    public WmsDeliveryRecord selectWmsDeliveryRecordByPlanId(Long planId);

    /**
     * 查询出库单列表
     *
     * @param wmsDeliveryRecord 出库单
     * @return 出库单集合
     */
    public List<WmsDeliveryRecord> selectWmsDeliveryRecordList(WmsDeliveryRecord wmsDeliveryRecord);

    /**
     * 新增出库单
     *
     * @param wmsDeliveryRecord 出库单
     * @return 结果
     */
    public int insertWmsDeliveryRecord(WmsDeliveryRecord wmsDeliveryRecord);

    /**
     * 修改出库单
     *
     * @param wmsDeliveryRecord 出库单
     * @return 结果
     */
    public int updateWmsDeliveryRecord(WmsDeliveryRecord wmsDeliveryRecord);

    /**
     * 删除出库单
     *
     * @param id 出库单主键
     * @return 结果
     */
    public int deleteWmsDeliveryRecordById(Long id);

    public int deleteWmsDeliveryRecordByDeliveryNo(String deliveryNo);

    public int deleteWmsDeliveryRecordByPlanId(Long planId);

    /**
     * 批量删除出库单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWmsDeliveryRecordByIds(Long[] ids);

    /**
     * 统计近七天的数据
     * @param params
     * @return
     */
    public List<Map<String,Object>> statNumBy7Day(Map<String,Object> params);

    /**
     * 统计本月的数据
     * @param params
     * @return
     */
    public List<Map<String,Object>> statNumByNowMonth(Map<String,Object> params);

    /**
     * 统计本月的数据
     * @param params
     * @return
     */
    public List<Map<String,Object>> statNumByNowYear(Map<String,Object> params);

    Integer queryStatus(@Param("planId") Long planId, @Param("deliveryNo") String deliveryNo);
}
